package com.atguigu.jxc.service.impl;

import com.atguigu.jxc.dao.GoodsTypeDao;
import com.atguigu.jxc.entity.GoodsTypeTree;
import com.atguigu.jxc.service.GoodsTypeService;
import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: fqy
 * Date: 2021/10/16
 * Time: 16:18
 * Describe:
 */
@Service
public class GoodsTypeServiceImpl implements GoodsTypeService {

    @Autowired
    private GoodsTypeDao goodsTypeDao;

    @Override
    public String getGoodsTypeTreeCode() {
        List<GoodsTypeTree> goodsTypeTreeList = goodsTypeDao.selectGoodsTypeTreeCode();
        Gson gson = new Gson();
        return gson.toJson(goodsTypeTreeList);
//        return null;
    }
}
